Glest Advanced Engine
Effects & Upgrades is a tentative name for a code patch that extends upon the existing framework for upgrades and adds the the ability to cause temporary effects on a unit. The code is currently in pre-alpha state. =Upgrades= The upgrade xml format is extended while retaining legacy support for existing upgrades. The new format cleans up the xml file somewhat by not requiring you to have nodes present for attributes your upgrade does not effect, while extending upon the number of attributes you can modify with an upgrade. In addition, attributes can be modified using a multiplier as well as a static value, allowing you to scale the effect across units of varying power. The following is a sample upgrade.xml file which does the exact same thing as the existing "Energy Sharpening" upgrade. Note that nodes under and are optional and default to 0 and 1.0, respectively. If you wanted to increase the attack strength by 30% instead, you could use the following code for the static-modifiers and multipliers tags. Common Attribute List The following is a complete list of attributes that can be modified by either a static amount or a multiplier in either the upgrade or effects XML structures and each should have a "value" attribute. Static values take a positive or negative number and default to zero (no modification). Multipliers take a floating point number, the default to 1.0 (multiply by one, or no modification). Note that this is not notated as a percentage. If you enter 100.0 for a multiplier, it means that the value increases 100 times. These are also covered in the reference section. <-- increases or decreases rate of attack --%gt; =Effects= Intro with examples Effects are embedded in the tag of the . At this time, only attack skills are supported, but a new skill type will be later added to allow effects to be put on friendly units as in casting a spell. The below is an example of an extended attack of the archer adding a poison to the arrows which causes blindness and 50 damage per second for 8 seconds. Note that the only part of this snippet that is modified from the original is the addition of the tag. Example Skill With Effects By using the multiplier of 0.2 for sight, their sight is reduced to 20% of normal. Reducing it further may result in a sight of zero, which would make them incapable of attacking even targets directly adjacent to them, and that probably wouldn't be a very balanced attack, but it would be funny. :) Effects can be used on attacks with a splash effect as well, this will cause all units in the splash radius to be effected. By default, all units are effected equally, even if they are on the very edge of the splash radius. However, by adding the flag to the section of the effect, this behavior can be overridden causing the strength of the effect to be weaker on units further from the point of impact. The strength of the effect isn't exposed through the XML interface, but it effects all attribute modifications (both positive and negative). Below is an example a theoretical effect added to the ice attack of an archmage. Presuming that the ice is cold, let's say that this will temporarily reduce the movement and attack speed of the target. However, the effect will be relative to where they in the splash radius. You may have noticed that the "stacking" attribute of the effect tag was set to "stack" this time instead of "overwrite." This means that successive attacks which cause this effect will accumulate, increasing the total effect. Each instance of the effect has it's own timer, so they will wear off one at a time. When set to "overwrite", the previous effect is simply overwritten and the duration reset. This isn't recommended for use with apply-splash-strength however because a second effect may be weaker and overwrite a stronger one. Now let's go overboard and improve the initiate's attack. This will cause their targets to take damage over time, encouraging them to run fast, set them on fire spewing out firey particles with a sizzling sound and causing them to glow red for the duration. In addition the initiate will get a recourse effect, which gives them some extra energy regeneration and movement speed (so he can follow his victim around and watch) for as long as the bastard is burning up. =Reference / Specification= Since there is no DTD, this section section will describe the expected XML format of newly added XML structures. For the Pluralism column in the nested elements descriptions, the following is the legend for the notation: Attributes none Nested Elements Attributes Nested Elements and Attributes none Nested Elements Each nested element requires a single attribute named "value". For static modifiers, the value should be an integer and for multipliers the value should be a floating point number. If an element doesn't appear, the default value for static modifiers is zero and the default value for multipliers is 1.0. Flags effect various aspects of the "effect". Most flags are for AI use and are not yet used, but are hints to tell the AI how best to use skills with the effect. Each nested element has no attributes or children. Attributes none Nested Elements and Specifies fields of travel that are added to or removed from the unit. This may be adding the ability for a unit to swim, or levitate or grounding an otherwise flying unit (forcing them to walk or become immobile). The only fields currently available are air and land. However, water, forest (i.e., travel through trees) and subterainian may be added in this mod. Attributes none Nested Elements Causes light to eminate from the unit or changes the light if one already exists. Attributes Nested Elements none Attributes Nested Elements none Attributes Nested Elements none Attributes none Nested Elements